<?php

$dados	= $_des->lista("WHERE idcliente  = '".$_SESSION['idcliente']."'",false,false); 

$total	= count($dados);

?>

<div id="barra-painel">
<h1>Descri&ccedil;&atilde;o de item</h1>


<table width="100%" id="TableDestalhes">
  <tr style="color:#666; background-color:#F2F2F2">
    <td width="327" align="left" valign="top"><h3 style="font-weight:normal; margin:0px">Autor</h3></td>
    <td width="414" align="left" valign="top">Item</td>
    <td width="183" align="left" valign="top"><h3 style="font-weight:normal; margin:0px">Data</h3></td>
    <td width="69" align="right" valign="top"><h3 style="font-weight:normal; margin:0px">Op&ccedil;&otilde;es</h3></td>
  </tr>
  
  <?php if(count($dados)==0){	?>
  
  <tr>
    <td colspan="4" align="left" valign="top">N&atilde;o existem descri&ccedil;&otilde;es no momento.</td>
  </tr>
  
  <? }else{
	
	foreach($dados as $descricao){ 
	$cliente	= $_cli->pega($descricao['idclientepost']);
	$produto	= $_anu->pega($descricao['idclientepost']);
	$data		= converte_datetime($descricao['data']);
	?>
  
  <tr>
    <td align="left" valign="top" style="text-transform:capitalize"><?=htmlentities($cliente["napresentacao"])?></td>
    <td align="left" valign="top" style="text-transform:capitalize"><?PHP print htmlentities($produto["titulo"]);?></td>
    <td align="left" valign="top" style="text-transform:capitalize"><?PHP print $data["data"];?> &agrave;s <?PHP print $data["horario"];?></td>
    <td align="right" valign="top" style="text-transform:capitalize"><a href="javascript:void(0);" onclick="javascript: NovaJanela('modulos/painel/descricao/detalhes.php?descricao=<?php print $descricao['id']; ?>','Detalhes da pergunta','590','380','1'); ;">detalhes</a></td>
  </tr>
  <? }} ?>
  
  
</table>